<?php
/**
 * Created by JetBrains PhpStorm.
 * User: khathirdstep1025
 * Date: 9/27/12
 * Time: 9:52 PM
 * To change this template use File | Settings | File Templates.
 */

class Detail extends CI_Controller{
    public function __construct(){
        parent::__construct();
    }

    public function index($id){
        $this->db->where('product_id', $id);
        $query = $this->db->get('product', 1);
        if ($query->num_rows > 0){
            foreach($query->result() as $row){
                $data['product'] = $row;
            }

        }
        $this->load->view('detail/detail', $data);
    }
}